package com.acwer.drgs.performance.es.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.time.Instant;
import java.util.Date;


@Data
@NoArgsConstructor
@ApiModel(value = "绩效信息",description ="渝卫计统4-1住院病案首页表(表号N041)")
@Document(indexName = "minipfm-stream",replicas = 0)
public class MiniPerformanceInfo {

    @ApiModelProperty(value = "主键",notes = "{ls:false}")
    @Id
    private String id;

    @ApiModelProperty(value = "机构名称",notes = "{ls:false}")
    private String username;

    @ApiModelProperty("医疗付款方式")
    private String ylfkfs;

    @ApiModelProperty("健康卡号")
    private String jkkh;

    @ApiModelProperty("住院次数")
    private String zycs;

    @ApiModelProperty("病案号")
    private String bah;

    @ApiModelProperty("姓名")
    private String xm;

    @ApiModelProperty("性别")
    private String xb;

    @ApiModelProperty("出生日期")
    @Field(type = FieldType.Long)
    private Long csrq;

    @ApiModelProperty("年龄")
    private Integer nl;

    @ApiModelProperty("国籍")
    private String gj;

    @ApiModelProperty("(年龄不足1周岁的)年龄(月)")
    private Integer bzyzsnl;

    @ApiModelProperty("新生儿出生体重(克)")
    private Double xsecstz;

    @ApiModelProperty("新生儿入院体重(克）")
    private Double xserytz;

    @ApiModelProperty("出生地")
    private String csd;

    @ApiModelProperty("籍贯")
    private String gg;

    @ApiModelProperty("民族")
    private String mz;

    @ApiModelProperty("身份证号")
    private String sfzh;

    @ApiModelProperty("职业")
    private String zy;

    @ApiModelProperty("婚姻")
    private String hy;

    @ApiModelProperty("现住址")
    private String xzz;

    @ApiModelProperty("电话")
    private String dh;

    @ApiModelProperty("邮编1")
    private String yb1;

    @ApiModelProperty("户口地址")
    private String hkdz;

    @ApiModelProperty("邮编")
    private String yb2;

    @ApiModelProperty("工作单位及地址")
    private String gzdwjdz;

    @ApiModelProperty("单位电话")
    private String dwdh;

    @ApiModelProperty("邮编")
    private String yb3;

    @ApiModelProperty("联系人姓名")
    private String lxrxm;

    @ApiModelProperty("关系")
    private String gx;

    @ApiModelProperty("地址")
    private String dz;

    @ApiModelProperty("电话")
    private String dh2;

    @ApiModelProperty("入院途径")
    private String rytj;

    @Field(type = FieldType.Long)
    @ApiModelProperty("入院时间")
    private Long rysj;

    @Field(type = FieldType.Long)
    @ApiModelProperty("时")
    private Long rysjs;

    @ApiModelProperty("入院科别")
    private String rykb;

    @ApiModelProperty("入院病房")
    private String rybf;

    @ApiModelProperty("转科科别")
    private String zkkb;

    @ApiModelProperty("出院时间")
    @Field(type = FieldType.Long)
    private Long cysj;

    @ApiModelProperty("时")
    @Field(type = FieldType.Long)
    private Long cysjs;

    @ApiModelProperty("出院科别")
    private String cykb;

    @ApiModelProperty("出院病房")
    private String cybf;

    @ApiModelProperty("实际住院(天)")
    private String sjzyts;

    @ApiModelProperty("门(急)诊诊断")
    private String mzzd;

    @ApiModelProperty("疾病编码")
    private String jbbm;

    @ApiModelProperty("实施临床路径")
    private String sslclj;

    @ApiModelProperty("抢救次数")
    private Integer qjcs;

    @ApiModelProperty("抢救成功次数")
    private Integer qjcgcs;

    @ApiModelProperty("确诊日期")
    private String qzrq;

    @ApiModelProperty("是否择期手术")
    private String zqss;

    @ApiModelProperty("病人来源")
    private String brly;

    @ApiModelProperty("主要诊断")
    private String zyzd;

    @ApiModelProperty("疾病编码")
    private String jbdm;

    @ApiModelProperty("入院病情")
    private String rybq;

    @ApiModelProperty("出院情况")
    private String cyqk;

    @ApiModelProperty("其他诊断")
    private String qtzd8;

    @ApiModelProperty("疾病编码")
    private String jbdm8;

    @ApiModelProperty("入院病情")
    private String rybq8;

    @ApiModelProperty("出院情况")
    private String cyqk8;

    @ApiModelProperty("其他诊断")
    private String qtzd1;

    @ApiModelProperty("疾病编码")
    private String jbdm1;

    @ApiModelProperty("入院病情")
    private String rybq1;

    @ApiModelProperty("出院情况")
    private String cyqk1;

    @ApiModelProperty("其他诊断")
    private String qtzd9;

    @ApiModelProperty("疾病编码")
    private String jbdm9;

    @ApiModelProperty("入院病情")
    private String rybq9;

    @ApiModelProperty("出院情况")
    private String cyqk9;

    @ApiModelProperty("其他诊断")
    private String qtzd2;

    @ApiModelProperty("疾病编码")
    private String jbdm2;

    @ApiModelProperty("入院病情")
    private String rybq2;

    @ApiModelProperty("出院情况")
    private String cyqk2;

    @ApiModelProperty("其他诊断")
    private String qtzd10;

    @ApiModelProperty("疾病编码")
    private String jbdm10;

    @ApiModelProperty("入院病情")
    private String rybq10;

    @ApiModelProperty("出院情况")
    private String cyqk10;

    @ApiModelProperty("其他诊断")
    private String qtzd3;

    @ApiModelProperty("疾病编码")
    private String jbdm3;

    @ApiModelProperty("入院病情")
    private String rybq3;

    @ApiModelProperty("出院情况")
    private String cyqk3;

    @ApiModelProperty("其他诊断")
    private String qtzd11;

    @ApiModelProperty("疾病编码")
    private String jbdm11;

    @ApiModelProperty("入院病情")
    private String rybq11;

    @ApiModelProperty("出院情况")
    private String cyqk11;

    @ApiModelProperty("其他诊断")
    private String qtzd4;

    @ApiModelProperty("疾病编码")
    private String jbdm4;

    @ApiModelProperty("入院病情")
    private String rybq4;

    @ApiModelProperty("出院情况")
    private String cyqk4;

    @ApiModelProperty("其他诊断")
    private String qtzd12;

    @ApiModelProperty("疾病编码")
    private String jbdm12;

    @ApiModelProperty("入院病情")
    private String rybq12;

    @ApiModelProperty("出院情况")
    private String cyqk12;

    @ApiModelProperty("其他诊断")
    private String qtzd5;

    @ApiModelProperty("疾病编码")
    private String jbdm5;

    @ApiModelProperty("入院病情")
    private String rybq5;

    @ApiModelProperty("出院情况")
    private String cyqk5;

    @ApiModelProperty("其他诊断")
    private String qtzd13;

    @ApiModelProperty("疾病编码")
    private String jbdm13;

    @ApiModelProperty("入院病情")
    private String rybq13;

    @ApiModelProperty("出院情况")
    private String cyqk13;

    @ApiModelProperty("其他诊断")
    private String qtzd6;

    @ApiModelProperty("疾病编码")
    private String jbdm6;

    @ApiModelProperty("入院病情")
    private String rybq6;

    @ApiModelProperty("出院情况")
    private String cyqk6;

    @ApiModelProperty("其他诊断")
    private String qtzd14;

    @ApiModelProperty("疾病编码")
    private String jbdm14;

    @ApiModelProperty("入院病情")
    private String rybq14;

    @ApiModelProperty("出院情况")
    private String cyqk14;

    @ApiModelProperty("其他诊断")
    private String qtzd7;

    @ApiModelProperty("疾病编码")
    private String jbdm7;

    @ApiModelProperty("入院病情")
    private String rybq7;

    @ApiModelProperty("出院情况")
    private String cyqk7;

    @ApiModelProperty("其他诊断")
    private String qtzd15;

    @ApiModelProperty("疾病编码")
    private String jbdm15;

    @ApiModelProperty("入院病情")
    private String rybq15;

    @ApiModelProperty("出院情况")
    private String cyqk15;

    @ApiModelProperty("中毒的外部原因")
    private String wbyy;

    @ApiModelProperty("疾病编码")
    private String h23;

    @ApiModelProperty("病理诊断出")
    private String blzd;

    @ApiModelProperty("疾病编码")
    private String jbmm;

    @ApiModelProperty("病理号")
    private String blh;

    @ApiModelProperty("药物过敏")
    private String ywgm;

    @ApiModelProperty("过敏药物疾病")
    private String gmyw;

    @ApiModelProperty("死亡患者尸检")
    private String swhzsj;

    @ApiModelProperty("血型")
    private String xx;

    @ApiModelProperty("Rh")
    private String rh;

    @ApiModelProperty("科主任")
    private String kzr;

    @ApiModelProperty("主任（副主任）医师")
    private String zrys;

    @ApiModelProperty("主治医师")
    private String zzys;

    @ApiModelProperty("住院医师")
    private String zyys;

    @ApiModelProperty("责任护士")
    private String zrhs;

    @ApiModelProperty("进修医师")
    private String jxys;

    @ApiModelProperty("实习医师")
    private String sxys;

    @ApiModelProperty("编码员")
    private String bmy;

    @ApiModelProperty("病案质量")
    private String bazl;

    @ApiModelProperty("质控医师")
    private String zkys;

    @ApiModelProperty("质控护士")
    private String zkhs;

    @ApiModelProperty("质控日期")
    private String zkrq;

    @ApiModelProperty("手术及操作编码")
    private String ssjczbm1;

    @ApiModelProperty("手术及操作日期")
    private String ssjczrq1;

    @ApiModelProperty("手术级别")
    private String ssjb1;

    @ApiModelProperty("手术及操作名称")
    private String ssjczmc1;

    @ApiModelProperty("术者")
    private String sz1;

    @ApiModelProperty("I助")
    private String yz1;

    @ApiModelProperty("II助")
    private String ez1;

    @ApiModelProperty("切口等级")
    private String qkdj1;

    @ApiModelProperty("切口愈合类别")
    private String qkyhlb1;

    @ApiModelProperty("麻醉方式")
    private String mzfs1;

    @ApiModelProperty("麻醉医师")
    private String mzys1;

    @ApiModelProperty("手术及操作编码")
    private String ssjczbm2;

    @ApiModelProperty("手术及操作日期")
    private String ssjczrq2;

    @ApiModelProperty("手术级别")
    private String ssjb2;

    @ApiModelProperty("手术及操作名称")
    private String ssjczmc2;

    @ApiModelProperty("术者")
    private String sz2;

    @ApiModelProperty("I助")
    private String yz2;

    @ApiModelProperty("II助")
    private String ez2;

    @ApiModelProperty("切口等级")
    private String qkdj2;

    @ApiModelProperty("切口愈合类别")
    private String qkyhlb2;

    @ApiModelProperty("麻醉方式")
    private String mzfs2;

    @ApiModelProperty("麻醉医师")
    private String mzys2;

    @ApiModelProperty("手术及操作编码")
    private String ssjczbm3;

    @ApiModelProperty("手术及操作日期")
    private String ssjczrq3;

    @ApiModelProperty("手术级别")
    private String ssjb3;

    @ApiModelProperty("手术及操作名称")
    private String ssjczmc3;

    @ApiModelProperty("术者")
    private String sz3;

    @ApiModelProperty("I助")
    private String yz3;

    @ApiModelProperty("II助")
    private String ez3;

    @ApiModelProperty("切口等级")
    private String qkdj3;

    @ApiModelProperty("切口愈合类别")
    private String qkyhlb3;

    @ApiModelProperty("麻醉方式")
    private String mzfs3;

    @ApiModelProperty("麻醉医师")
    private String mzys3;

    @ApiModelProperty("手术及操作编码")
    private String ssjczbm4;

    @ApiModelProperty("手术及操作日期")
    private String ssjczrq4;

    @ApiModelProperty("手术级别")
    private String ssjb4;

    @ApiModelProperty("手术及操作名称")
    private String ssjczmc4;

    @ApiModelProperty("术者")
    private String sz4;

    @ApiModelProperty("I助")
    private String yz4;

    @ApiModelProperty("II助")
    private String ez4;

    @ApiModelProperty("切口等级")
    private String qkdj4;

    @ApiModelProperty("切口愈合类别")
    private String qkyhlb4;

    @ApiModelProperty("麻醉方式")
    private String mzfs4;

    @ApiModelProperty("情况麻醉医师")
    private String mzys4;

    @ApiModelProperty("手术及操作编码")
    private String ssjczbm5;

    @ApiModelProperty("手术及操作日期")
    private String ssjczrq5;

    @ApiModelProperty("手术级别")
    private String ssjb5;

    @ApiModelProperty("手术及操作名称")
    private String ssjczmc5;

    @ApiModelProperty("术者")
    private String sz5;

    @ApiModelProperty("I助")
    private String yz5;

    @ApiModelProperty("II助")
    private String ez5;

    @ApiModelProperty("切口等级")
    private String qkdj5;

    @ApiModelProperty("切口愈合类别")
    private String qkyhlb5;

    @ApiModelProperty("麻醉方式")
    private String mzfs5;

    @ApiModelProperty("麻醉医师")
    private String mzys5;

    @ApiModelProperty("手术及操作编码")
    private String ssjczbm6;

    @ApiModelProperty("手术及操作日期")
    private String ssjczrq6;

    @ApiModelProperty("手术级别")
    private String ssjb6;

    @ApiModelProperty("手术及操作名称")
    private String ssjczmc6;

    @ApiModelProperty("术者")
    private String sz6;

    @ApiModelProperty("I助")
    private String yz6;

    @ApiModelProperty("II助")
    private String ez6;

    @ApiModelProperty("切口等级")
    private String qkdj6;

    @ApiModelProperty("切口愈合类别")
    private String qkyhlb6;

    @ApiModelProperty("麻醉方式")
    private String mzfs6;

    @ApiModelProperty("麻醉医师")
    private String mzys6;

    @ApiModelProperty("手术及操作编码")
    private String ssjczbm7;

    @ApiModelProperty("手术及操作日期")
    private String ssjczrq7;

    @ApiModelProperty("手术级别")
    private String ssjb7;

    @ApiModelProperty("手术及操作名称")
    private String ssjczmc7;

    @ApiModelProperty("术者")
    private String sz7;

    @ApiModelProperty("I助")
    private String yz7;

    @ApiModelProperty("II助")
    private String ez7;

    @ApiModelProperty("切口等级")
    private String qkdj7;

    @ApiModelProperty("切口愈合类别")
    private String qkyhlb7;

    @ApiModelProperty("麻醉方式")
    private String mzfs7;

    @ApiModelProperty("麻醉医师")
    private String mzys7;

    @ApiModelProperty("离院方式")
    private String lyfs;

    @ApiModelProperty("医嘱转院，拟接收医疗机构名称")
    private String yzzy_yljg;

    @ApiModelProperty("医嘱转社区卫生服务机构/乡镇卫生院，拟接收医疗机构名称")
    private String wsy_yljg;

    @ApiModelProperty("是否有出院31天内再住院计划")
    private String sfzzyjh;

    @ApiModelProperty("目的")
    private String md;

    @ApiModelProperty("颅脑损伤患者昏迷入院前时间：天")
    private Integer ryq_t;

    @ApiModelProperty("颅脑损伤患者昏迷入院前时间：小时")
    private Integer ryq_xs;

    @ApiModelProperty("颅脑损伤患者昏迷入院前时间：分")
    private Integer ryq_f;

    @ApiModelProperty("颅脑损伤患者昏迷入院后时间：天")
    private Integer ryh_t;

    @ApiModelProperty("颅脑损伤患者昏迷入院后时间：小时")
    private Integer ryh_xs;

    @ApiModelProperty("颅脑损伤患者昏迷入院后时间：分")
    private Integer ryh_f;

    @ApiModelProperty("住院费用(元)：总费用")
    private Double zfy;

    @ApiModelProperty("自付金额")
    private Double zfje;

    @ApiModelProperty("综合医疗服务类：(1)一般医疗服务费")
    private Double ylfuf;

    @ApiModelProperty("一般治疗操作费")
    private Double zlczf;

    @ApiModelProperty("护理费住院费")
    private Double hlf;

    @ApiModelProperty("其他费用")
    private Double qtfy;

    @ApiModelProperty("诊断类：(5)病理诊断费")
    private Double blzdf;

    @ApiModelProperty("实验室诊断费")
    private Double syszdf;

    @ApiModelProperty("影像学诊断费")
    private Double yxxzdf;

    @ApiModelProperty("临床诊断项目费")
    private Double lczdxmf;

    @ApiModelProperty("治疗类：(9)非手术治疗项目费")
    private Double fsszlxmf;

    @ApiModelProperty("临床物理治疗费")
    private Double wlzlf;

    @ApiModelProperty("手术治疗费")
    private Double sszlf;

    @ApiModelProperty("麻醉费")
    private Double maf;

    @ApiModelProperty("手术费")
    private Double ssf;

    @ApiModelProperty("康复类：(11)康复费")
    private Double kff;

    @ApiModelProperty("中医类:(12)中医治疗费")
    private Double zyzlf;

    @ApiModelProperty("西药类:(13)西药费")
    private Double xyf;

    @ApiModelProperty("抗菌药物费")
    private Double kjywf;

    @ApiModelProperty("中药类:(14)中成药费")
    private Double zcyf;

    @ApiModelProperty("中草药费")
    private Double zcyf1;

    @ApiModelProperty("血液和血液制品类:(16)血费")
    private Double xf;

    @ApiModelProperty("白蛋白类制品费")
    private Double bdblzpf;

    @ApiModelProperty("球蛋白类制品费")
    private Double qdblzpf;

    @ApiModelProperty("凝血因子类制品费")
    private Double nxyzlzpf;

    @ApiModelProperty("细胞因子类制品费")
    private Double xbyzlzpf;

    @ApiModelProperty("耗材类:(21)检查用一次性医用材料费")
    private Double hcyyclf;

    @ApiModelProperty("(22)治疗用一次性医用材料费")
    private Double yyclf;

    @ApiModelProperty("(23)手术用一次性医用材料费")
    private Double ycxyyclf;

    @ApiModelProperty("其他类：(24)其他费")
    private Double qtf;


    @ApiModelProperty("导入时间")
    @CreatedDate
    @Field(type = FieldType.Date,name ="@timestamp", format = DateFormat.date_optional_time)
    private Date timestamp;


    @ApiModelProperty("分组信息")
    private GrpInfo grpinfo;

    @ApiModelProperty("是否入组")
    private Boolean ingrp;
    
    @ApiModel(value = "分组信息",description ="分组信息")
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
  public  static class GrpInfo{
        @ApiModelProperty("DRG编码")
        private String drg;

        @ApiModelProperty("DRG组名称")
        private String name;
        //平均床日
        @ApiModelProperty("平均床日")
        private Double benchmarkStayDays;
        //权重
        @ApiModelProperty("权重")
        private Double weight;
        //平均费用
        @ApiModelProperty("平均费用")
        private Double benchmarkFee;
        //可信度
        @ApiModelProperty("可信度")
        private Double dkkx;
        //mdc编码
        @ApiModelProperty("mdc编码")
        private String mdc;
        //入组类别
        @ApiModelProperty("入组类别")
        private String rzlb;
        //adrg组编码
        @ApiModelProperty("adrg组编码")
        private  String adrg;

        @ApiModelProperty("drg入组类别：外科（.[a-j].*）、操作（.[k-q].*）、内科（.[r-z].*）")
        private String drgingrptype;

    }
}
